import request from '@/utils/request'

// 查询巡查线路与安保人员关联列表
export function listLineGuard(query) {
  return request({
    url: '/patrol/line_guard/list',
    method: 'get',
    params: query
  })
}
// 查询巡查线路与安保人员关联列表(不分页)
export function listLineGuardNoPage() {
  return request({
    url: '/patrol/line_guard/list/nopage',
    method: 'get'
  })
}
// 查询未完成巡查的学校和线路
export function listLineGuardUndone(query) {
  return request({
    url: '/patrol/line_guard/list/undone',
    method: 'get',
    params: query
  })
}

export function countLineGuard(query) {
  return request({
    url: '/patrol/line_guard/count',
    method: 'get',
    params: query
  })
}

// 查询巡查线路与安保人员关联详细
export function getLineGuard(id) {
  return request({
    url: '/patrol/line_guard/' + id,
    method: 'get'
  })
}

// 新增巡查线路与安保人员关联
export function addLineGuard(data) {
  return request({
    url: '/patrol/line_guard',
    method: 'post',
    data: data
  })
}

// 修改巡查线路与安保人员关联
export function updateLineGuard(data) {
  return request({
    url: '/patrol/line_guard',
    method: 'put',
    data: data
  })
}

// 删除巡查线路与安保人员关联
export function delLineGuard(id) {
  return request({
    url: '/patrol/line_guard/' + id,
    method: 'delete'
  })
}

// 导出巡查线路与安保人员关联
export function exportLineGuard(query) {
  return request({
    url: '/patrol/line_guard/export',
    method: 'get',
    params: query
  })
}
